package org.fusionide.builder.parsers.cfml.tags;

import java.util.Vector;

import org.fusionide.builder.parsers.cfml.CFMLTag;
import org.fusionide.builder.parsers.cfml.Variable;


public class Component extends CFMLTag {

	// <cfcomponent bindingname="" displayname="" extends="" hint="" name=""
	// namespace=""
	// output="" porttypename="" serviceportname="" style="" wsdlfile="">
	// </cfcomponent>

	private String bindingName;

	private String displayName;

	private String extendsValue;

	private String hint;

	private String name;

	private String namespace;

	private String output;

	private String portTypeName;

	private String servicePortName;

	private String style;

	private String wsdlFile;

	public Component(String attributes, int startOffset) {
		super(attributes, startOffset);

		if (attributes == null)
			return;

		bindingName = getAttribute("bindingname");
		displayName = getAttribute("displayname");
		extendsValue = getAttribute("extends");
		hint = getAttribute("hint");
		name = getAttribute("name");
		namespace = getAttribute("namespace");
		output = getAttribute("output");
		portTypeName = getAttribute("porttypename");
		servicePortName = getAttribute("serviceportname");
		style = getAttribute("style");
		wsdlFile = getAttribute("wsdlfile");
	}

	@Override
	public boolean requiresClosingTag() {
		return true;
	}

	@Override
	public boolean acceptsChildren(CFMLTag tag) {
		if (super.acceptsChildren(tag)) {
			if (tag.getClass() != Component.class) {
				return true;
			}
		}
		return false;
	}

	public String getBindingName() {
		return bindingName;
	}

	public void setBindingName(String bindingName) {
		this.bindingName = bindingName;
	}

	public String getDisplayName() {
		return displayName;
	}

	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	public String getExtendsValue() {
		return extendsValue;
	}

	public void setExtendsValue(String extendsValue) {
		this.extendsValue = extendsValue;
	}

	public String getHint() {
		return hint;
	}

	public void setHint(String hint) {
		this.hint = hint;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getNamespace() {
		return namespace;
	}

	public void setNamespace(String namespace) {
		this.namespace = namespace;
	}

	public String getOutput() {
		return output;
	}

	public void setOutput(String output) {
		this.output = output;
	}

	public String getPortTypeName() {
		return portTypeName;
	}

	public void setPortTypeName(String portTypeName) {
		this.portTypeName = portTypeName;
	}

	public String getServicePortName() {
		return servicePortName;
	}

	public void setServicePortName(String servicePortName) {
		this.servicePortName = servicePortName;
	}

	public String getStyle() {
		return style;
	}

	public void setStyle(String style) {
		this.style = style;
	}

	public String getWsdlFile() {
		return wsdlFile;
	}

	public void setWsdlFile(String wsdlFile) {
		this.wsdlFile = wsdlFile;
	}

}
